<template>
  <div>
    <el-dialog
      title="查看原因"
      :visible.sync="showTrue.value"
      width="500Px"
      height="332px"
      @close="closeDialog"
      center
      custom-class="dialogNoPadding dialogFontGray"
    >
        <ul  class="viewReason_Box">
           <li ><span class="viewReason_color">下单时间:</span> <span>{{viewReason.createTime}}</span></li>
           <li ><span class="viewReason_color">关闭时间:</span> <span>{{viewReason.closeTime}}</span></li>
           <li ><span class="viewReason_color">操作人员:</span> <span></span>{{viewReason.cancelPeople}}</li>
           <li ><span class="viewReason_color">关闭原因:</span> <span>{{viewReason.cancelReason}}</span></li>
            <el-button class="viewReason_button"  @click="closeViewDialog">确定</el-button>
        </ul>
           
    </el-dialog>
  </div>
</template>

<script>
import { orderViewReason } from "../../../../../requestApi/order/allOrder";
export default {
  props: ["showTrue", "orderId"],
  data() {
    return {
      
      viewReason:{
      
      }
     ,
     
      
    };
  },
  filters: {},
  watch: {
    showTrue(val) {
      this.dialogShow = val;
    },
    orderData(val) {
      this.orderId =val
    }
  },
  created() {},
  mounted() {
    let self = this;
    self.orderViewReasonFun();
   
  },
  methods: {
    closeDialog() {
      this.$emit("close");
    },
    submitDialog() {
      this.$emit("submit");
    },
    //
    async orderViewReasonFun() {
      let self = this;
      let params = {
        orderId:self.orderId
      };
      let res = await orderViewReason(params);
      self.list = [];

      if (res.status == 200 && res.data) {
        this.viewReason = res.data;
      } else {
        this.$message({
          type: "error",
          message: "系统开小差！"
        });
      }
    },
    closeViewDialog(){
      this.showTrue.value=false
  }
  }
  
};
</script>

<style scoped rel="stylesheet">
.viewReason_Box {
  padding: 10px 131px 45px 131px;

  line-height: 40px;
  font-size: 14px;
  color: rgba(45, 55, 62, 1);
}
.viewReason_color {
  color: rgba(152, 159, 173, 1);
  padding-right: 10px;
}
.viewReason_button {
  display: block;
  margin: auto;
  margin-top: 25px;
  width: 108px;
  height: 32px;
  background: rgba(235, 68, 38, 1);
  border-radius: 2px;
  color: #fff;
}
</style>